﻿namespace ``Concerning the resource manager``

open System.Globalization 

module ``When accessing localized strings``= 
    open FSpec

    let ``it return a string equals``()=
        Resources.TheValuesShouldBeEqual |> should.equal "The values should be equal."
        Resources.TheValuesShouldNotBeEqual |> should.equal "The values should not be equal."

    let ``it return a string for isTrue``()=
        Resources.TheValueShouldBeTrue |> should.equal "The value should be true."
        Resources.TheValueShouldNotBeTrue |> should.equal "The value should not be true."

    let ``it return a string for isFalse``()=
        Resources.TheValueShouldBeFalse |> should.equal "The value should be false."
        Resources.TheValueShouldNotBeFalse |> should.equal "The value should not be false."

    let ``it return a string for isGreaterThan``()=
        Resources.TheValueShouldBeGreaterThanThis |> should.equal "The value should be greater than this."
        Resources.TheValueShouldNotBeGreaterThanThis |> should.equal "The value should not be greater than this."

    let ``it return a string for isGreaterThanOrEqualTo``()=
        Resources.TheValueShouldBeGreaterThanOrEqualToThis |> should.equal "The value should be greater than or equal to this."
        Resources.TheValueShouldNotBeGreaterThanOrEqualToThis |> should.equal "The value should not be greater than or equal to this."

    let ``it return a string for isLessThan``()=
        Resources.TheValueShouldBeLessThanThis |> should.equal "The value should be less than this."
        Resources.TheValueShouldNotBeLessThanThis |> should.equal "The value should not be less than this."

    let ``it return a string for isLessThanOrEqualTo``()=
        Resources.TheValueShouldBeLessThanOrEqualToThis |> should.equal "The value should be less than or equal to this."
        Resources.TheValueShouldNotBeLessThanOrEqualToThis |> should.equal "The value should not be less than or equal to this."

    let ``it return a string for isTheSameAs``()=
        Resources.TheValuesShouldBeTheSame |> should.equal "The values should be the same."
        Resources.TheValuesShouldNotBeTheSame |> should.equal "The values should not be the same."

    let ``it return a string for contains``()=
        Resources.TheCollectionShouldContainTheElement_0_ |> should.equal "The collection should contain the element {0}."
        Resources.TheCollectionShouldNotContainTheElement_0_ |> should.equal "The collection should not contain the element {0}."

    let ``it return a string for containsTheString``()=
        Resources.TheStringShouldContainTheSubstring_0_ |> should.equal "The string should contain the substring {0}."
        Resources.TheStringShouldNotContainTheSubstring_0_ |> should.equal "The string should not contain the substring {0}."

    let ``it return a string for startsWith``()=
        Resources.TheStringShouldStartWith_0_ |> should.equal "The string should start with {0}."
        Resources.TheStringShouldNotStartWith_0_ |> should.equal "The string should not start with {0}."

    let ``it return a string for endsWith``()=
        Resources.TheStringShouldEndWith_0_ |> should.equal "The string should end with {0}."
        Resources.TheStringShouldNotEndWith_0_ |> should.equal "The string should not end with {0}."

    let ``it return a string for matchExpression``()=
        Resources.TheStringShouldMatchARegularExpression |> should.equal "The string should match a regular expression."
        Resources.TheStringShouldNotMatchARegularExpression |> should.equal "The string should not match a regular expression."

    let ``it return a string for isNull``()=
        Resources.TheValueShouldBeNull |> should.equal "The value should be null."
        Resources.TheValueShouldNotBeNull |> should.equal "The value should not be null."

    let ``it return a string for failwith``()=
        Resources.TheExpressionShouldFailWithTheMessage_0_ 
        |> should.equal "The expression should fail with the message: {0}."

    let ``it return a string for doesNotfailwith``()=
        Resources.TheExpressionShouldNotFailWithTheMessage_0_ 
        |> should.equal "The expression should not fail with the message: {0}."

    let ``it return a string for rejectIf``()=
        Resources.TheExpressionShouldEvaluateToFalse
        |> should.equal "The expression should evaluate to false."

    let ``it return a string for beWithin``()=
        Resources.TheValueShouldBeWithin_0_of_1_
        |> should.equal "The value should be within {0} of {1}."

    let ``it return a string for notBeWithin``()=
        Resources.TheValueShouldNotBeWithin_0_of_1_
        |> should.equal "The value should not be within {0} of {1}."